package com.netease.framework.a;

import com.netease.c.j;
import com.netease.j.f;
import java.io.IOException;
import java.util.HashMap;
import java.util.Vector;

class d extends Thread
{
  protected boolean a;
  private m c;
  private f d;
  private boolean e;
  private boolean f;

  d(a parama)
  {
  }

  private void a(m paramm, int paramInt, Object paramObject)
  {
    this.c = null;
    if (this.b.g);
    while (true)
    {
      return;
      if (10005 == paramInt)
      {
        Vector localVector2 = this.b.a(paramm);
        if (localVector2 != null)
        {
          localVector2.remove(paramm);
          this.b.a(localVector2);
        }
        if (paramm.m() == null)
          continue;
        paramm.m().a(paramm, paramInt, paramObject);
        continue;
      }
      Vector localVector1 = this.b.a(paramm);
      if (paramm.m() == null)
        continue;
      if ((paramm.e()) && (localVector1 != null) && (localVector1.size() > 0))
      {
        paramm.m().a(localVector1, paramInt, paramObject);
        continue;
      }
      paramm.m().a(paramm, paramInt, paramObject);
    }
  }

  private void a(m paramm, Object paramObject)
  {
    this.c = null;
    if (this.b.g);
    while (true)
    {
      return;
      Vector localVector = this.b.a(paramm);
      if ((localVector != null) && (localVector.size() > 1))
      {
        if (paramm.m() == null)
          continue;
        paramm.m().a(localVector, paramObject);
        continue;
      }
      if (paramm.m() == null)
        continue;
      paramm.m().a(paramm, paramObject);
    }
  }

  private f b(m paramm)
  {
    this.d = com.netease.j.d.a(this.b.f, paramm);
    this.d.a(30000);
    this.b.b = System.currentTimeMillis();
    try
    {
      this.d.b();
      return this.d;
    }
    catch (com.netease.k.c localc)
    {
      while ((0x1 & paramm.h()) == 0);
      throw localc;
    }
    catch (com.netease.a.a.d locald)
    {
      do
        com.netease.l.b.d.a();
      while ((0x1 & paramm.h()) == 0);
      throw locald;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
      if (this.d != null)
        this.d.e();
      this.d = null;
    }
    throw localException;
  }

  // ERROR //
  private int c(m paramm)
  {
    // Byte code:
    //   0: invokestatic 95	java/lang/System:currentTimeMillis	()J
    //   3: pop2
    //   4: aload_0
    //   5: aload_1
    //   6: invokespecial 123	com/netease/framework/a/d:b	(Lcom/netease/framework/a/m;)Lcom/netease/j/f;
    //   9: astore 25
    //   11: aload 25
    //   13: astore 17
    //   15: aload 17
    //   17: invokeinterface 125 1 0
    //   22: istore 18
    //   24: iload 18
    //   26: istore 5
    //   28: getstatic 129	com/netease/pris/app/e:a	Z
    //   31: ifeq +28 -> 59
    //   34: ldc 131
    //   36: new 133	java/lang/StringBuilder
    //   39: dup
    //   40: invokespecial 134	java/lang/StringBuilder:<init>	()V
    //   43: ldc 136
    //   45: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   48: iload 5
    //   50: invokevirtual 143	java/lang/StringBuilder:append	(I)Ljava/lang/StringBuilder;
    //   53: invokevirtual 147	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   56: invokestatic 152	com/netease/g/b:e	(Ljava/lang/String;Ljava/lang/String;)V
    //   59: aload_0
    //   60: getfield 18	com/netease/framework/a/d:b	Lcom/netease/framework/a/a;
    //   63: aload_1
    //   64: invokestatic 155	com/netease/framework/a/a:a	(Lcom/netease/framework/a/a;Lcom/netease/framework/a/m;)Z
    //   67: istore 19
    //   69: iload 19
    //   71: ifeq +32 -> 103
    //   74: aload_0
    //   75: invokevirtual 156	com/netease/framework/a/d:e	()V
    //   78: iload 5
    //   80: ireturn
    //   81: astore 15
    //   83: ldc2_w 157
    //   86: invokestatic 162	java/lang/Thread:sleep	(J)V
    //   89: aload_0
    //   90: aload_1
    //   91: invokespecial 123	com/netease/framework/a/d:b	(Lcom/netease/framework/a/m;)Lcom/netease/j/f;
    //   94: astore 16
    //   96: aload 16
    //   98: astore 17
    //   100: goto -85 -> 15
    //   103: iload 5
    //   105: sipush 200
    //   108: if_icmpeq +11 -> 119
    //   111: iload 5
    //   113: sipush 201
    //   116: if_icmpne +106 -> 222
    //   119: aload 17
    //   121: invokeinterface 164 1 0
    //   126: astore 20
    //   128: aload 20
    //   130: ifnull +28 -> 158
    //   133: aload 20
    //   135: ldc 166
    //   137: invokevirtual 172	java/lang/String:indexOf	(Ljava/lang/String;)I
    //   140: istore 24
    //   142: iload 24
    //   144: iflt +14 -> 158
    //   147: aload_0
    //   148: invokevirtual 156	com/netease/framework/a/d:e	()V
    //   151: bipush 255
    //   153: istore 5
    //   155: goto -77 -> 78
    //   158: aload 17
    //   160: invokeinterface 175 1 0
    //   165: lstore 21
    //   167: aload_0
    //   168: getfield 18	com/netease/framework/a/d:b	Lcom/netease/framework/a/a;
    //   171: aload_1
    //   172: invokestatic 155	com/netease/framework/a/a:a	(Lcom/netease/framework/a/a;Lcom/netease/framework/a/m;)Z
    //   175: ifne +40 -> 215
    //   178: lload 21
    //   180: lconst_0
    //   181: lcmp
    //   182: ifeq +496 -> 678
    //   185: aload_1
    //   186: invokevirtual 178	com/netease/framework/a/m:B	()Z
    //   189: ifne +489 -> 678
    //   192: aload 17
    //   194: invokeinterface 182 1 0
    //   199: astore 23
    //   201: aload_0
    //   202: aload_1
    //   203: aload 23
    //   205: invokespecial 183	com/netease/framework/a/d:a	(Lcom/netease/framework/a/m;Ljava/lang/Object;)V
    //   208: aload 17
    //   210: invokeinterface 185 1 0
    //   215: aload_0
    //   216: invokevirtual 156	com/netease/framework/a/d:e	()V
    //   219: goto -141 -> 78
    //   222: iload 5
    //   224: bipush 255
    //   226: if_icmpne +76 -> 302
    //   229: aload_0
    //   230: aload_1
    //   231: iload 5
    //   233: aconst_null
    //   234: invokespecial 186	com/netease/framework/a/d:a	(Lcom/netease/framework/a/m;ILjava/lang/Object;)V
    //   237: goto -22 -> 215
    //   240: astore 12
    //   242: ldc 188
    //   244: new 133	java/lang/StringBuilder
    //   247: dup
    //   248: invokespecial 134	java/lang/StringBuilder:<init>	()V
    //   251: ldc 190
    //   253: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   256: aload 12
    //   258: invokevirtual 191	com/netease/k/c:toString	()Ljava/lang/String;
    //   261: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   264: ldc 193
    //   266: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   269: aload_1
    //   270: invokevirtual 195	com/netease/framework/a/m:b	()Ljava/lang/String;
    //   273: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   276: invokevirtual 147	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   279: invokestatic 152	com/netease/g/b:e	(Ljava/lang/String;Ljava/lang/String;)V
    //   282: aload_0
    //   283: aload_1
    //   284: sipush 10014
    //   287: aconst_null
    //   288: invokespecial 186	com/netease/framework/a/d:a	(Lcom/netease/framework/a/m;ILjava/lang/Object;)V
    //   291: aload_0
    //   292: invokevirtual 156	com/netease/framework/a/d:e	()V
    //   295: bipush 254
    //   297: istore 5
    //   299: goto -221 -> 78
    //   302: aload_0
    //   303: aload_1
    //   304: iload 5
    //   306: aload 17
    //   308: invokeinterface 182 1 0
    //   313: invokespecial 186	com/netease/framework/a/d:a	(Lcom/netease/framework/a/m;ILjava/lang/Object;)V
    //   316: goto -101 -> 215
    //   319: astore 11
    //   321: ldc 188
    //   323: new 133	java/lang/StringBuilder
    //   326: dup
    //   327: invokespecial 134	java/lang/StringBuilder:<init>	()V
    //   330: ldc 197
    //   332: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   335: aload 11
    //   337: invokevirtual 198	com/netease/framework/a/e:toString	()Ljava/lang/String;
    //   340: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   343: ldc 193
    //   345: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   348: aload_1
    //   349: invokevirtual 195	com/netease/framework/a/m:b	()Ljava/lang/String;
    //   352: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   355: invokevirtual 147	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   358: invokestatic 152	com/netease/g/b:e	(Ljava/lang/String;Ljava/lang/String;)V
    //   361: aload_0
    //   362: aload_1
    //   363: sipush 10002
    //   366: aconst_null
    //   367: invokespecial 186	com/netease/framework/a/d:a	(Lcom/netease/framework/a/m;ILjava/lang/Object;)V
    //   370: aload_0
    //   371: invokevirtual 156	com/netease/framework/a/d:e	()V
    //   374: bipush 254
    //   376: istore 5
    //   378: goto -300 -> 78
    //   381: astore 10
    //   383: ldc 188
    //   385: new 133	java/lang/StringBuilder
    //   388: dup
    //   389: invokespecial 134	java/lang/StringBuilder:<init>	()V
    //   392: ldc 200
    //   394: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   397: aload 10
    //   399: invokevirtual 201	com/netease/e/a:toString	()Ljava/lang/String;
    //   402: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   405: ldc 193
    //   407: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   410: aload_1
    //   411: invokevirtual 195	com/netease/framework/a/m:b	()Ljava/lang/String;
    //   414: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   417: invokevirtual 147	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   420: invokestatic 152	com/netease/g/b:e	(Ljava/lang/String;Ljava/lang/String;)V
    //   423: aload_0
    //   424: aload_1
    //   425: sipush 10013
    //   428: aconst_null
    //   429: invokespecial 186	com/netease/framework/a/d:a	(Lcom/netease/framework/a/m;ILjava/lang/Object;)V
    //   432: aload_0
    //   433: invokevirtual 156	com/netease/framework/a/d:e	()V
    //   436: bipush 254
    //   438: istore 5
    //   440: goto -362 -> 78
    //   443: astore 9
    //   445: ldc 188
    //   447: new 133	java/lang/StringBuilder
    //   450: dup
    //   451: invokespecial 134	java/lang/StringBuilder:<init>	()V
    //   454: ldc 203
    //   456: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   459: aload 9
    //   461: invokevirtual 204	com/netease/a/a/d:toString	()Ljava/lang/String;
    //   464: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   467: ldc 193
    //   469: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   472: aload_1
    //   473: invokevirtual 195	com/netease/framework/a/m:b	()Ljava/lang/String;
    //   476: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   479: invokevirtual 147	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   482: invokestatic 152	com/netease/g/b:e	(Ljava/lang/String;Ljava/lang/String;)V
    //   485: aload_0
    //   486: aload_1
    //   487: sipush 10011
    //   490: aconst_null
    //   491: invokespecial 186	com/netease/framework/a/d:a	(Lcom/netease/framework/a/m;ILjava/lang/Object;)V
    //   494: aload_0
    //   495: invokevirtual 156	com/netease/framework/a/d:e	()V
    //   498: bipush 254
    //   500: istore 5
    //   502: goto -424 -> 78
    //   505: astore 6
    //   507: aload 6
    //   509: astore 7
    //   511: bipush 255
    //   513: istore 5
    //   515: ldc 188
    //   517: new 133	java/lang/StringBuilder
    //   520: dup
    //   521: invokespecial 134	java/lang/StringBuilder:<init>	()V
    //   524: ldc 206
    //   526: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   529: aload 7
    //   531: invokevirtual 207	java/io/IOException:toString	()Ljava/lang/String;
    //   534: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   537: ldc 193
    //   539: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   542: aload_1
    //   543: invokevirtual 195	com/netease/framework/a/m:b	()Ljava/lang/String;
    //   546: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   549: invokevirtual 147	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   552: invokestatic 152	com/netease/g/b:e	(Ljava/lang/String;Ljava/lang/String;)V
    //   555: aload_0
    //   556: getfield 209	com/netease/framework/a/d:f	Z
    //   559: istore 8
    //   561: iload 8
    //   563: ifeq +14 -> 577
    //   566: aload_0
    //   567: invokevirtual 156	com/netease/framework/a/d:e	()V
    //   570: bipush 253
    //   572: istore 5
    //   574: goto -496 -> 78
    //   577: aload_0
    //   578: invokevirtual 156	com/netease/framework/a/d:e	()V
    //   581: goto -503 -> 78
    //   584: astore_3
    //   585: ldc 188
    //   587: new 133	java/lang/StringBuilder
    //   590: dup
    //   591: invokespecial 134	java/lang/StringBuilder:<init>	()V
    //   594: ldc 211
    //   596: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   599: aload_3
    //   600: invokevirtual 212	java/lang/Exception:toString	()Ljava/lang/String;
    //   603: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   606: ldc 193
    //   608: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   611: aload_1
    //   612: invokevirtual 195	com/netease/framework/a/m:b	()Ljava/lang/String;
    //   615: invokevirtual 140	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   618: invokevirtual 147	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   621: invokestatic 152	com/netease/g/b:e	(Ljava/lang/String;Ljava/lang/String;)V
    //   624: aload_0
    //   625: getfield 209	com/netease/framework/a/d:f	Z
    //   628: istore 4
    //   630: iload 4
    //   632: ifeq +14 -> 646
    //   635: aload_0
    //   636: invokevirtual 156	com/netease/framework/a/d:e	()V
    //   639: bipush 253
    //   641: istore 5
    //   643: goto -565 -> 78
    //   646: aload_0
    //   647: aload_1
    //   648: sipush 10009
    //   651: aconst_null
    //   652: invokespecial 186	com/netease/framework/a/d:a	(Lcom/netease/framework/a/m;ILjava/lang/Object;)V
    //   655: aload_0
    //   656: invokevirtual 156	com/netease/framework/a/d:e	()V
    //   659: bipush 254
    //   661: istore 5
    //   663: goto -585 -> 78
    //   666: astore_2
    //   667: aload_0
    //   668: invokevirtual 156	com/netease/framework/a/d:e	()V
    //   671: aload_2
    //   672: athrow
    //   673: astore 7
    //   675: goto -160 -> 515
    //   678: aconst_null
    //   679: astore 23
    //   681: goto -480 -> 201
    //
    // Exception table:
    //   from	to	target	type
    //   4	11	81	java/lang/NullPointerException
    //   0	4	240	com/netease/k/c
    //   4	11	240	com/netease/k/c
    //   15	24	240	com/netease/k/c
    //   28	69	240	com/netease/k/c
    //   83	96	240	com/netease/k/c
    //   119	142	240	com/netease/k/c
    //   158	215	240	com/netease/k/c
    //   229	237	240	com/netease/k/c
    //   302	316	240	com/netease/k/c
    //   0	4	319	com/netease/framework/a/e
    //   4	11	319	com/netease/framework/a/e
    //   15	24	319	com/netease/framework/a/e
    //   28	69	319	com/netease/framework/a/e
    //   83	96	319	com/netease/framework/a/e
    //   119	142	319	com/netease/framework/a/e
    //   158	215	319	com/netease/framework/a/e
    //   229	237	319	com/netease/framework/a/e
    //   302	316	319	com/netease/framework/a/e
    //   0	4	381	com/netease/e/a
    //   4	11	381	com/netease/e/a
    //   15	24	381	com/netease/e/a
    //   28	69	381	com/netease/e/a
    //   83	96	381	com/netease/e/a
    //   119	142	381	com/netease/e/a
    //   158	215	381	com/netease/e/a
    //   229	237	381	com/netease/e/a
    //   302	316	381	com/netease/e/a
    //   0	4	443	com/netease/a/a/d
    //   4	11	443	com/netease/a/a/d
    //   15	24	443	com/netease/a/a/d
    //   28	69	443	com/netease/a/a/d
    //   83	96	443	com/netease/a/a/d
    //   119	142	443	com/netease/a/a/d
    //   158	215	443	com/netease/a/a/d
    //   229	237	443	com/netease/a/a/d
    //   302	316	443	com/netease/a/a/d
    //   0	4	505	java/io/IOException
    //   4	11	505	java/io/IOException
    //   15	24	505	java/io/IOException
    //   83	96	505	java/io/IOException
    //   0	4	584	java/lang/Exception
    //   4	11	584	java/lang/Exception
    //   15	24	584	java/lang/Exception
    //   28	69	584	java/lang/Exception
    //   83	96	584	java/lang/Exception
    //   119	142	584	java/lang/Exception
    //   158	215	584	java/lang/Exception
    //   229	237	584	java/lang/Exception
    //   302	316	584	java/lang/Exception
    //   0	4	666	finally
    //   4	11	666	finally
    //   15	24	666	finally
    //   28	69	666	finally
    //   83	96	666	finally
    //   119	142	666	finally
    //   158	215	666	finally
    //   229	237	666	finally
    //   242	291	666	finally
    //   302	316	666	finally
    //   321	370	666	finally
    //   383	432	666	finally
    //   445	494	666	finally
    //   515	561	666	finally
    //   585	630	666	finally
    //   646	655	666	finally
    //   28	69	673	java/io/IOException
    //   119	142	673	java/io/IOException
    //   158	215	673	java/io/IOException
    //   229	237	673	java/io/IOException
    //   302	316	673	java/io/IOException
  }

  protected m a()
  {
    return this.c;
  }

  protected void a(m paramm)
  {
    if (paramm != null)
    {
      if (this.b.f == null)
        this.b.f = a.a(this.b);
      this.e = true;
      this.f = false;
      this.c = paramm;
      if (!paramm.e());
    }
    while (true)
    {
      int j;
      synchronized (this.b.d)
      {
        Vector localVector2 = (Vector)this.b.d.get(paramm.b() + paramm.l());
        if (localVector2 == null)
          continue;
        localVector2.add(paramm);
        this.e = false;
        this.c = null;
        break label372;
        Vector localVector3 = new Vector();
        localVector3.add(paramm);
        this.b.d.put(paramm.b() + paramm.l(), localVector3);
        int i = -1;
        j = 0;
        try
        {
          if ((this.b.g) || (j >= 2) || (paramm.u()))
            continue;
          i = c(paramm);
          if (i == -1)
            break label305;
          this.e = false;
          if (i != -3)
            break label318;
          Vector localVector1 = this.b.a(paramm);
          this.b.a(localVector1);
          this.c = null;
        }
        catch (Exception localException)
        {
          this.e = false;
          localException.printStackTrace();
          if (paramm == null)
            break label372;
        }
        if (paramm.u())
          break label363;
        a(paramm, 10007, null);
      }
      label305: if (!paramm.A())
      {
        j++;
        break label373;
        label318: this.c = null;
        if (a.a(this.b, paramm))
        {
          a(paramm, 10005, null);
        }
        else if (j >= 2)
        {
          a(paramm, 10003, null);
          break label372;
          label363: a(paramm, 10005, null);
        }
        label372: return;
      }
      label373: j++;
    }
  }

  protected f b()
  {
    return this.d;
  }

  protected boolean c()
  {
    return this.e;
  }

  protected boolean d()
  {
    if (this.e)
    {
      this.f = true;
      if (this.d == null);
    }
    try
    {
      this.d.e();
      this.d = null;
      return true;
    }
    catch (IOException localIOException)
    {
      while (true)
        localIOException.printStackTrace();
    }
  }

  protected void e()
  {
    if (this.d != null);
    try
    {
      this.d.e();
      this.d = null;
      return;
    }
    catch (IOException localIOException)
    {
      while (true)
        localIOException.printStackTrace();
    }
  }

  public void run()
  {
    while ((!this.b.g) && (!this.a))
    {
      m localm = (m)this.b.c.h();
      if (localm == null)
        continue;
      if ((0xFF & localm.f()) == 4)
      {
        a(localm);
        continue;
      }
      a(localm);
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.framework.a.d
 * JD-Core Version:    0.6.0
 */